package com.uliky.shouyiLibrary.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 1.整合mybatisplus
 * 1）引入依赖
 *          <dependency>
 *             <groupId>com.baomidou</groupId>
 *             <artifactId>mybatis-plus-boot-starter</artifactId>
 *             <version>3.3.1</version>
 *         </dependency>
 * 2）配置
 *  1.配置数据源
 *      1）导入数据库驱动
 *      <!- servlet-api tomcat通常会自带。所以在打包时忽略-->
 *         <dependency>
 *             <groupId>javax.servlet</groupId>
 *             <artifactId>servlet-api</artifactId>
 *             <version>2.5</version>
 *             <!-打包时忽略-->
 *             <scope>provided</scope>
 *         </dependency>
 *      2)在application.yml中配置数据源信息
 *  2.配置mybatis-plus
 *      1）在启动类上加上mapperscan注解，配置接口路径
 *      2）在配置文件中标记sql映射文件路径
 */
@EnableFeignClients(basePackages = "com.uliky.shouyiLibrary.product.feign")
@MapperScan("com.uliky.shouyiLibrary.product.dao")
@SpringBootApplication
@EnableDiscoveryClient
@EnableRedisHttpSession
public class ShouyiLibraryProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(ShouyiLibraryProductApplication.class, args);
    }

}
